import Vue from "vue";
import Vuex from "vuex";

import createPersistedState from "vuex-persistedstate";

Vue.use(Vuex);

export default new Vuex.Store({
  plugins: [createPersistedState()],
  state: {
    cityName: "北京",
    cityId: "110100",
    isLogin: false,
    isSelectCity: false
  },
  mutations: {
      changeCityName(state,value){
        state.cityName = value
      },
      changeCityId(state,value){
        state.cityId = value
      },
      changeLogin(state,value){
        state.isLogin = value
      },
      changeSelectCity(state,value){
        state.isSelectCity = value
      }
  },
  actions: {},
  modeles: {}
});
